<template>
  <div style="color: #fff;
        width: 100%;
        height: 100%;
        text-align: center;
        line-height: 50px;
        border-radius: 4"
:style="{ background: color }">
    {{ color }}
  </div>
</template>
<script>
export default {
	name: 'ColorBox',
	inject: ['getNode'],
	data() {
		return {
			color: '#0ffff0'
		}
	},
	mounted() {
		const node = this.getNode()
		console.log(node)
		node.on('change:data',({ current }) => {
			const { color } = current
			this.color = color
		})
	}
}
</script>